-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: multiindex formatting #12929
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: multiindex formatting #12929
Conversation
@TomAugspurger @jorisvandenbossche @sinhrks @shoyer @wesm hmm, I see a double comma already........ |
could probably squeeze |
d8a98be
to
11403dd
Compare
comments? |
Something like
instead of
would maybe be clearer? But, in any case, following |
In the example you pasted above (copied from there):
Is there a reason the individual labels lists break of and do not fit on one line? It seems they should fit on one line? |
I think that last might be a bug. I have to twiddle the justification settings. |
so I think there is a bug in the current formatter that basically hard-codes 10 as the truncated width, here is a modification that uses 1/2 of the max_seq_items and bounds it between 10 and 50 (so it has some flex) (this is of course limited by the display_width as well)
|
so with the above change (and allowing labels & levels to have different max_seq_items), though still limited to (10,50) range
|
One option where there are a lot of levels could be to display them like a |
7631ad5
to
81c8ca9
Compare
ok updated a bit. The above is with the default options (though width is 80) |
if you have a chance. can you see if these changes look resonable for the truncation / formatting in categoricals
couple of failing tests. I am not sure of the parameters that were used to initially generate these. I have hard coded in a context manager, but I am doing something wrong. |
closing, but maybe someone can pick this up. |
It would also depend a bit on what we do with #13480 (issue about changing the default multi-index repr) |
closes #12423